<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/mytag.jspf"%>

<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>用户</title>
<script type="text/javascript">
function upImage(){
	$("#imgForm").ajaxSubmit({
		dataType : "json",
		success : function(data) {
			if (data.success == true) {
				var url = data.msg;
				$("#imgId").attr("src",url);
				$("#img").val(url);
			} else {
				alert(data.msg);
			}
		}
	});
}
</script>
</head>
<body>
	<ol class="am-breadcrumb am-breadcrumb-slash am-padding" style="margin-bottom: 0px;">
		<li><a href="management/index">首页</a></li>
		<li><a href="management/vip/buyIndex">会员消费记录</a></li>
		<li><a href="management/vip/hairdoedit/"+${hairdoRecordId }>会员消费记录修改</a></li>
		<li class="am-active">新增照片</li>
	</ol>
	<div class="am-g">
		<div class="am-u-md-12">
			
				<div class="am-tabs am-margin">
					<ul class="am-tabs-nav am-nav am-nav-tabs">
						<li class="am-active"><a href="javascript:void(0)">基本信息</a></li>
					</ul>
					<div class="am-tabs-bd">
						<div class="am-tab-panel am-active">
							<div class="am-g am-margin-top">
								<div class="am-u-md-2 am-text-right">发型照片</div>
								<div class="am-u-md-4 am-u-end">
									<img id="imgId" src="file/a.png" class="am-form-field am-input-sm">
									<form id="imgForm" action="management/file" method="post" enctype="multipart/form-data">
										<div class="am-form-group am-form-file">
										  <button type="button" class="am-btn am-btn-default am-btn-sm">
										    <i class="am-icon-cloud-upload"></i> 选择要上传的图片</button>
										  <input name="imageFile" id="imageFile" onchange="upImage();" type="file" multiple>
										</div>
									</form>
								</div>
							</div>
						<form class="am-form" id="form" name="form"  method="post" action="management/vip/imgsave">
							<input type="hidden" name="img" id="img" class="am-form-field am-input-sm">
							<input type="hidden" name="hairdoRecordId" id="hairdoRecordId" value="${hairdoRecordId }" class="am-form-field am-input-sm"><!-- pshopId -->
						</div>
					</div>
				</div>
				<div class="am-margin">
					<button class="am-btn am-btn-primary am-btn-xs" type="submit"><span class="am-icon-check"></span> 保存</button>
					<a href="javascript:;" onClick="javascript:history.back(-1);" class="am-btn am-btn-primary am-btn-xs"><span class="am-icon-times"></span> 取消</a>
				</div>
			</form>
		</div>
	</div>
</body>
</html>
